#ifndef MESSAGE_TEST_H
#define MESSAGE_TEST_H

//#define main FooMain

#include <gtest/gtest.h>
#include "test_common.h"

#include <src/message.h>

class ut_message : public ::testing::Test
{
public:
	ut_message()
	{
	}
};

TEST_F(ut_message, constructor)
{
	int message_id = 2;
	const char* payload = "abc";
	message* msg = new message(message_id, payload, sizeof(payload));

	ASSERT_TRUE(msg != NULL);
	EXPECT_EQ(message_id, msg->id);
	EXPECT_EQ(payload, msg->payload);
	EXPECT_EQ(sizeof(payload), msg->payload_size);

    delete msg;
}

#endif // MESSAGE_TEST_H
